//
//  HMTextView.m
//  ChongTaiApp
//
//  Created by Mac book on 16/6/16.
//  Copyright © 2016年 ChongTai. All rights reserved.
//

#import "HMTextView.h"

@implementation HMTextView

+ (UITextView *)createTextViewWithText:(NSString *)text andTextColor:(UIColor*)textColor andBgColor:(UIColor*)bgcolor andFont:(UIFont *)font andTextAlignment:(NSTextAlignment )textAlignment andscrollEnabled:(BOOL)scrollEnabled andeditable:(BOOL)editable
{

    UITextView *textView = [[UITextView alloc]init];


    if (text) {
        textView.text = text;
    }
    if (textColor) {
        textView.textColor = textColor;
    }
    if (bgcolor) {
        textView.backgroundColor = bgcolor;
    }
    if (font) {
        [textView setFont:font];
    }
    if (textAlignment) {
        textView.textAlignment = textAlignment;
    }
    if (scrollEnabled) {
        textView.scrollEnabled = scrollEnabled;
    }
    if (editable) {
        textView.editable = editable;
    }


    return textView;

}

@end
